<template>
  <div class="home">
    <el-container>
      <el-header style="text-align: right; font-size: 12px">
        <h1 style="float: left; margin: 0 0 0 30px; padding: 0">
          付费预约自习室
        </h1>

        <h1 class="exit">退出登录</h1>
        <h1 style="float: right; margin: 0 30px 0 0; padding: 0">
          【管理员名称】，你好！美好的一天，从阅读开始！
        </h1>
      </el-header>
      <el-container>
        <el-aside width="200px">
          <el-row class="tac">
            <el-col style="width: 100%">
              <el-menu
                default-active="2"
                class="el-menu-vertical-demo"
                @open="handleOpen"
                @close="handleClose"
                background-color="#373d41"
                text-color="#fafafb"
                active-text-color="#ffd04b"
              >
                <el-submenu index="1">
                  <template slot="title">
                    <span>用户列表</span>
                  </template>
                  <el-menu-item index="1-2">用户卡卷</el-menu-item>
                  <el-menu-item index="1-3">学时排行</el-menu-item>
                  <el-menu-item index="1-4">打卡记录</el-menu-item>
                </el-submenu>
                <el-menu-item index="2">
                  <span slot="title">区域管理</span>
                </el-menu-item>
                <el-submenu index="3">
                  <template slot="title">
                    <span>座位管理</span>
                  </template>
                  <el-menu-item index="3-2">座位预约情况</el-menu-item>
                </el-submenu>
                <el-submenu index="4">
                  <template slot="title">
                    <span>卡券管理</span>
                  </template>
                  <el-menu-item index="4-2">用户购买记录</el-menu-item>
                </el-submenu>
                <el-submenu index="5">
                  <template slot="title">
                    <span>兑换码管理</span>
                  </template>
                  <el-menu-item index="5-2">生成兑换码</el-menu-item>
                </el-submenu>
                <el-menu-item index="6">
                  <span slot="title">兑换码审核</span>
                </el-menu-item>
                <el-menu-item index="20">
                  <span slot="title">订单管理</span>
                </el-menu-item>
                <el-submenu index="7">
                  <template slot="title">
                    <span>充值管理</span>
                  </template>
                  <el-menu-item index="7-2">充值价格配置</el-menu-item>
                </el-submenu>
                <el-menu-item index="8">
                  <span slot="title">大门管理</span>
                </el-menu-item>
                <el-menu-item index="9">
                  <span slot="title">首页幻灯片管理</span>
                </el-menu-item>
                <el-menu-item index="10">
                  <span slot="title">兑换时长管理</span>
                </el-menu-item>
                <el-menu-item index="11">
                  <span slot="title">商家电话管理</span>
                </el-menu-item>
                <el-menu-item index="12">
                  <span slot="title">营业时间配置</span>
                </el-menu-item>
                <el-menu-item index="13">
                  <span slot="title">预约时间配置</span>
                </el-menu-item>
                <el-menu-item index="14">
                  <span slot="title">停业时间配置</span>
                </el-menu-item>
              </el-menu>
            </el-col>
          </el-row>
        </el-aside>
        <el-main>Main</el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
export default {
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
  },
};
</script>
<style lang="less" scoped>
.home {
  height: 100vh;
  .el-container {
    height: 100vh;
  }
}
.el-header,
.el-footer {
  background-color: #373d41;
  color: #fafafb;
  text-align: center;
  line-height: 60px;
}
.el-menu {
  border: none;
}
.el-aside {
  background-color: #373d41;
  color: #fafafb;
  text-align: center;
  line-height: 200px;
}

.el-main {
  background-color: #ffffff;
  color: #333;
  text-align: center;
  line-height: 160px;
  padding: 30px;
}

body > .el-container {
  margin-bottom: 40px;
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
}

.el-container:nth-child(7) .el-aside {
  line-height: 320px;
}
.exit {
  float: right;
  margin: 0 0 0 0;
  padding: 0;
}
.exit:hover {
  text-decoration: underline;
  cursor: pointer;
}
</style>
